package com.SpringBo.login.controller;

import com.SpringBo.login.entity.Account;
import com.SpringBo.login.service.LoginService;
import io.lettuce.core.dynamic.annotation.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/account")
public class AccountController {

    @Autowired
    private LoginService accountService;


    @PostMapping("/register")
    public String register(@RequestBody Account account) throws Exception {
        return accountService.addAccount(account);
    }

    //测试springboot是否通模块
    @GetMapping("/intoTesting")
    public String intoTesting(@Param("use")String use) throws Exception {
        System.out.println("dfsdsfdddfff");
        return accountService.testing(use);
    }
}
